package gemini.pollux.ui.client.utils;


public class UIConstants {
	
	// Layout Position
	public static enum LayoutPosition {
		NAVIGATION, CONTENT;
	}
	
	// Navigation Tab
	public static enum NavigationTab {
		MARKETING_PLAN("Marketing Plan"),
		USER("User"),
		PRODUCT("Product"),
		TRANSACTION("Transaction"),
		STORE("Store");
		
		String text;
		
		NavigationTab(String text){
			this.text = text;
		}
		
		public String getText() {
			return text;
		}
		
		public static NavigationTab getFromText(String text){
			for (NavigationTab item : NavigationTab.values()) {
				if(item.text.equals(text)){
					return item;
				}
			}
			return null;
		}
	}

	// Navigation Item
	public static enum NavigationItem {
		LEVEL("Level", UIConstants.PLACE_LEVEL, NavigationTab.MARKETING_PLAN),
		PRODUCT_TYPE("Product Type", UIConstants.PLACE_PRODUCT_TYPE, NavigationTab.PRODUCT),
		PRODUCT("Product", UIConstants.PLACE_PRODUCT, NavigationTab.PRODUCT);
		
		String text;
		String placeId;
		NavigationTab tab;

		NavigationItem(String text, String placeId, NavigationTab tab){
			this.text = text;
			this.placeId = placeId;
			this.tab = tab;
		}

		public String getText() {
			return text;
		}
		
		public NavigationTab getTab() {
			return tab;
		}
		
		public String getPlaceId() {
			return placeId;
		}
		
		public static NavigationItem getFromText(String text){
			for (NavigationItem item : NavigationItem.values()) {
				if(item.text.equals(text)){
					return item;
				}
			}
			return null;
		}
	}
	
	// Screen Place
	public static final String PLACE_ROOT = "Root";
	public static final String PLACE_WELCOME = "Welcome";
	
	public static final String PLACE_LEVEL = "Level";
	public static final String PLACE_PRODUCT_TYPE = "ProductType";
	public static final String PLACE_PRODUCT = "Product";
}